﻿@using NTQOnlineExam.Services.Infrastructure.MVC
@model NTQOnlineExamFrontend.Models.OrderConfirmationViewModel

@{
    ViewBag.Title = "Order Confirmation";
    Layout = "~/Views/Shared/_LayoutNoLeft.cshtml";
}


<div class="table">
    <div class="col-sm-12 margin-bottom-20 ">
        <label>Thank you for your purchasing. Your order is completed. </label>
    </div>
    <div class="col-sm-4">
        <table class="table  table-bordered">
            <tr>
                <td>
                    <label>@this.LocalResources("OrderId")</label>
                </td>
                <td>
                    @Model.Order.OrderUniqueId
                </td>
            </tr>
            <tr>
                <td>
                    <label>@this.LocalResources("SubTotal")</label>
                </td>
                <td>
                    @Model.Order.SubTotalDisplay
                </td>
            </tr>
            <tr>
                <td>
                    <label>@this.LocalResources("BillingAddress")</label>
                </td>
                <td>
                    @Model.Order.BillingAddress
                </td>
            </tr>
            <tr>
                <td>
                    <label>@this.LocalResources("BillingZipCode")</label>
                </td>
                <td>
                    @Model.Order.BillingZipCode
                </td>
            </tr>
            <tr>
                <td>
                    <label>@this.LocalResources("BillingPOBOx")</label>
                </td>
                <td>
                    @Model.Order.BillingPOBox
                </td>
            </tr>
            <tr>
                <td>
                    <label>@this.LocalResources("BillingCity")</label>
                </td>
                <td>
                    @Model.Order.BillingCity
                </td>
            </tr>
        </table>
    </div>
    @*<div class="col-sm-1">
    </div>*@
    <div class="col-sm-8">
        <table class="table table-striped">
            <thead>
                <tr>
                    <th>@this.LocalResources("TermId")</th>
                    <th>@this.LocalResources("TermName")</th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
                @if (Model.Order.OrderDetails != null)
                {
                    foreach (var item in Model.Order.OrderDetails)
                    {
                    <tr>
                        <td>@item.TermId</td>
                        <td>@item.TermName</td>
                        <td><a href="@Url.RouteUrl(new { Controller = "Member", Action = "Examination", selectedTerm = item.TermId })">Do exam</a></td>
                    </tr>
                    }
                }
            </tbody>
        </table>
        <div class="col-sm-7">
            <a class="btn btn-red" href='@Url.RouteUrl(new { Controller = "Term", Action = "GetTerms" })'>Continue shopping</a>
        </div>
    </div>

</div>


